package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelReviewComparatorDescending implements Comparator<Hotel> {
	
	private static HotelReviewComparatorDescending hotelReviewComparatorDescending = new HotelReviewComparatorDescending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel2.getStarValue().getReview()-hotel1.getStarValue().getReview();
	}
	
	private HotelReviewComparatorDescending(){
		
	}
	
	public static HotelReviewComparatorDescending getInstance(){
		return hotelReviewComparatorDescending;
	}			

}
